import type { RouteRecordRaw } from 'vue-router';

import { BasicLayout } from '#/layouts';

const routes: RouteRecordRaw[] = [
  {
    component: BasicLayout,
    meta: {
      icon: 'ic:baseline-view-in-ar',
      keepAlive: true,
      order: 1000,
      authority: ['3', '2'],
      title: '商品管理',
    },
    name: 'Demos',
    path: '/demos',
    children: [
      {
        meta: {
          title: '商品列表',
          authority: ['2'],
        },
        name: 'productList',
        path: '/product/list',
        component: () => import('#/views/product/index.vue'),
      },
      {
        meta: {
          title: '商品审核',
          authority: ['3'],
        },
        name: 'productApprove',
        path: '/product/approve',
        component: () => import('#/views/product/approve.vue'),
      },
      {
        meta: {
          title: '订单列表',
          authority: ['3'],
        },
        name: 'orderList',
        path: '/order/list',
        component: () => import('#/views/order/index.vue'),
      },
    ],
  },
];

export default routes;
